from django import forms
from common.utils.custom_form_field import JsonArrayDateField, JsonArrayField, UserIDStringField


class GameAggregateAnalysisForm(forms.Form):
    time_range = JsonArrayDateField()
    user_type = forms.CharField(required=False)
    chn_list = JsonArrayField(required=False)
    game_type = JsonArrayField(required=False)
    game_id_list = JsonArrayField(required=False)
    chn_device_type = forms.CharField(required=False)
    interval_type = forms.CharField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)


class BetAnalysisForm(forms.Form):
    time_range = JsonArrayDateField(required=True)
    user_id = UserIDStringField(required=False)
    registered_time_range = JsonArrayDateField(required=True)
    sort_by = forms.CharField(max_length=50, required=False)
    channel = JsonArrayField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)
    amount_max = forms.IntegerField(required=False)
    amount_min = forms.IntegerField(required=False)
    profit_amount_max = forms.IntegerField(required=False)
    profit_amount_min = forms.IntegerField(required=False)
    game_type = JsonArrayField(required=False)
    game_id_list = JsonArrayField(required=False)
    display_dimension = forms.IntegerField(required=False)


class FishAnalysisForm(forms.Form):
    time_range = JsonArrayDateField(required=True)
    user_id = forms.IntegerField(required=False)
    interval_type = forms.CharField(required=False)
    user_type = forms.CharField(required=False)
    room_id = JsonArrayField(required=False)
    fish_type = JsonArrayField(required=False)
    sort_by = forms.CharField(required=False)
    size = forms.IntegerField(required=False)
    page = forms.IntegerField(required=False)
    to_export_file = forms.IntegerField(required=False)
